cmake_minimum_required(VERSION 2.6)

project(libvoAACEnc)

set( SRCPATH ${CMAKE_CURRENT_SOURCE_DIR}/../ )



include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../inc/ 
					${CMAKE_CURRENT_SOURCE_DIR}/../src	 
					${CMAKE_CURRENT_SOURCE_DIR}/../basic_op/	 
					)

message(${CMAKE_CURRENT_SOURCE_DIR})

#file ( GLOB_RECURSE lib_source_files "${CMAKE_CURRENT_SOURCE_DIR}/../../src/*.*" )
#file ( GLOB_RECURSE common_source_files "${COMMON_SOURCE_DIR}/*.cpp" )

add_library(voAACEnc STATIC 
		${SRCPATH}/src/aac_rom.c 
		${SRCPATH}/src/aacenc.c 
		${SRCPATH}/src/aacenc_core.c 
		${SRCPATH}/src/adj_thr.c 
		${SRCPATH}/src/band_nrg.c 
		${SRCPATH}/src/bit_cnt.c 
		${SRCPATH}/src/bitbuffer.c 
		${SRCPATH}/src/bitenc.c 
		${SRCPATH}/src/block_switch.c
		${SRCPATH}/src/channel_map.c 
		${SRCPATH}/src/dyn_bits.c 
		${SRCPATH}/src/grp_data.c 
		${SRCPATH}/src/interface.c 
		${SRCPATH}/src/line_pe.c 
		${SRCPATH}/src/ms_stereo.c 
		${SRCPATH}/src/pre_echo_control.c 
		${SRCPATH}/src/psy_configuration.c 
		${SRCPATH}/src/psy_main.c 
		${SRCPATH}/src/qc_main.c 
		${SRCPATH}/src/quantize.c 
		${SRCPATH}/src/sf_estim.c 
		${SRCPATH}/src/spreading.c 
		${SRCPATH}/src/stat_bits.c 
		${SRCPATH}/src/tns.c 
		${SRCPATH}/src/transform.c 
		${SRCPATH}/src/memalign.c
		${SRCPATH}/basic_op/basicop2.c 
		${SRCPATH}/basic_op/oper_32b.c
					)				


set( CMAKE_BUILE_TYPE DEBUG )
#SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb ")
#SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")

#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${target_dir}/lib)
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ )
set( LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/ )
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${target_dir}/bin))

add_definitions(-g -Wall -fPIC -DLINUX  -DPOSIX -DLCHECK  -Wno-unused-variable -Wno-unused-parameter -Wno-unused-function)
